/* ==========================================================
   AI Delivery - Decisions ("Every Stage Closes with a recorded decision")
   File: wwwroot/css/ai-delivery-decisions.css
   Used by: Views/Partials/blocklist/Components/aiDeliveryDecisionsBlock.cshtml
   Fluid layout: same scaling as the other blocks (6.8vw gutter).
   ========================================================== */
.ai-dc {
  --dc-navy: #14256b;
  --dc-orange: #ff9a45;
  --dc-gutter: 6.8vw;
  --dc-pill-h: clamp(42px, 3.6vw, 92px);
  --dc-ease: cubic-bezier(.65, 0, .35, 1);
  --dc-ease-out: cubic-bezier(.16, 1, .3, 1);

  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(90deg, #ffffff 0%, #fffaf6 14%, #fde8d8 46%, #fbc49a 78%, #f9a86c 100%);
  padding: clamp(40px, 6.8vw, 176px) var(--dc-gutter) clamp(40px, 5.6vw, 144px);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--dc-navy);
  -webkit-font-smoothing: antialiased;
}
.ai-dc *, .ai-dc *::before, .ai-dc *::after { box-sizing: border-box; margin: 0; padding: 0; }

.ai-dc__inner {
  display: grid;
  grid-template-columns: 33vw minmax(0, 1fr);
  gap: clamp(24px, 2.4vw, 62px);
  align-items: start;
}
.ai-dc__heading {
  max-width: 28vw;
  margin-bottom: clamp(8px, .7vw, 18px);
  font-size: clamp(22px, 1.82vw, 47px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--dc-navy);
}
.ai-dc__text {
  max-width: 34vw;
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(13px, .87vw, 22px);
  line-height: 1.6;
  color: var(--dc-navy);
}
.ai-dc__text strong { font-weight: 700; }

/* ---------- Decision path ---------- */
.ai-dc__path {
  position: relative;
  margin-top: clamp(4px, 1.2vw, 30px);     /* lines the pills up with the heading */
}
.ai-dc__pills {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(16px, 2.9vw, 74px);
  list-style: none;
}
.ai-dc__line {
  position: absolute;
  top: 50%;
  left: 4%;
  right: 4%;
  height: 1px;
  background: rgba(20, 37, 107, .35);
  transform: translateY(-50%);
  pointer-events: none;
}
/* travelling dot */
.ai-dc__dot {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 0;            /* travels behind the pills, glowing along the line */
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--dc-orange);
  box-shadow: 0 0 0 4px rgba(255, 154, 69, .25), 0 0 18px 4px rgba(255, 154, 69, .65);
  opacity: 0;
  transition: left 1.1s var(--dc-ease), opacity .6s ease;
  pointer-events: none;
}
.ai-dc__dot.is-on { opacity: 1; }

.ai-dc__pill {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: grid;
  place-items: center;
  min-width: 0;
  height: var(--dc-pill-h);
  padding: 0 clamp(12px, 1vw, 26px);
  border: 1px solid rgba(20, 37, 107, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: clamp(13px, 1.04vw, 27px);
  font-weight: 500;
  color: var(--dc-navy);
  white-space: nowrap;
  cursor: default;
  transition: background-color .7s var(--dc-ease), color .7s var(--dc-ease), border-color .7s var(--dc-ease),
              box-shadow .7s var(--dc-ease), transform .7s var(--dc-ease-out);
}
/* lit by the travelling dot, or hovered */
.ai-dc__pill.is-lit,
.ai-dc__pill:hover {
  background: var(--dc-navy);
  border-color: var(--dc-navy);
  color: #fff;
  box-shadow: 0 14px 30px -16px rgba(20, 37, 107, .7);
  transform: translateY(-2px);
}

/* ---------- Entrance ---------- */
.ai-dc.js-reveal .ai-dc__heading,
.ai-dc.js-reveal .ai-dc__text,
.ai-dc.js-reveal .ai-dc__pill { opacity: 0; transform: translateY(20px); }
.ai-dc.js-reveal.is-visible .ai-dc__heading,
.ai-dc.js-reveal.is-visible .ai-dc__text,
.ai-dc.js-reveal.is-visible .ai-dc__pill {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease var(--dc-d, 0s), transform 1s var(--dc-ease-out) var(--dc-d, 0s),
              background-color .7s var(--dc-ease), color .7s var(--dc-ease), border-color .7s var(--dc-ease), box-shadow .7s var(--dc-ease);
}
.ai-dc.js-reveal.is-visible .ai-dc__text { --dc-d: .1s; }
.ai-dc.js-reveal.is-done .ai-dc__pill.is-lit,
.ai-dc.js-reveal.is-done .ai-dc__pill:hover { transform: translateY(-2px); }

/* ---------- SMALL LAPTOP / TABLET ---------- */
@media (max-width: 1200px) {
  .ai-dc { --dc-gutter: 32px; }
  .ai-dc__inner { grid-template-columns: 1fr; }
  .ai-dc__heading, .ai-dc__text { max-width: 640px; }
  .ai-dc__path { margin-top: 8px; }
}

/* ---------- MOBILE: 2 x 2 pills ---------- */
@media (max-width: 620px) {
  .ai-dc { --dc-gutter: 20px; }
  .ai-dc__pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ai-dc__line, .ai-dc__dot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-dc *, .ai-dc *::before, .ai-dc *::after { transition: none !important; }
  .ai-dc__dot { display: none; }
}